const Stock = require("../modules/Stock")

module.exports = async ({ word }) => {
    let result = []
    result = await Stock.search({ word })
    result.reverse()
    if (result.length > 10) result.length = 10
    return result
}